<?php $auth=0; ?>
<?php include 'lib/includes.php'; ?>
<?php include 'partials/header_menu.php';?> 
<script src="Chart/Chart.js"></script>

<br>
<br>
<h3>&nbsp;Les statistiques</h3>
<br>
<form class="" method="post" accept-charset="utf-8">
 <table>
  <tr>
  <th>
  <div class="checkbox">
    <label>
      &nbsp;&nbsp;&nbsp; <input type="checkbox" id="client"> client
    </label>
  </div>
  </th>
  <th>
  <div class="checkbox">
    <label>
     &nbsp;&nbsp;&nbsp; <input type="checkbox" id="region"> région
    </label>
  </div>
  </th>
  </tr>
   <tr>
  <th>
  <div class="checkbox">
    <label>
      &nbsp;&nbsp;&nbsp; <input type="checkbox"> médicament &nbsp;&nbsp;&nbsp; 
    </label>
  </div>
  </th>
  <th>
  <div class="checkbox">
    <label>
     &nbsp;&nbsp;&nbsp; <input type="checkbox"> société
    </label>
  </div>
  </th>
  </tr>
  </table>
</form>
<br>
<center><script type="text/javascript">
 $(document).ready(function() {
	$('#client').click(function(){
		
		$.post( "stat.php", 
		{ client:client },function(response,status){ // Required Callback Function
//"response" receives - whatever written in echo of above PHP script.
alert("*----Received Data----*\n\nResponse : " + response+"\n\nStatus : " + status);
}
		);
});
});
<?php 
if(isset($_POST['client']))
{
	echo $_POST['client'];
	var_dump($_POST['client']);
}
?>
</script>
<!--Put the following in the <body>-->

<div style="width:80%">
			<div id="canvas-holder">
			<canvas id="chart-area" width="300" height="300"/>
		     </div>
	<script>

		var pieData = [
				{
					value: 300,
					color:"#F7464A",
					highlight: "#FF5A5E",
					label: "nombre des clients"
				},
				{
					value: 50,
					color: "#46BFBD",
					highlight: "#5AD3D1",
					label: "Green"
				},
				{
					value: 100,
					color: "#FDB45C",
					highlight: "#FFC870",
					label: "Yellow"
				},
				{
					value: 40,
					color: "#949FB1",
					highlight: "#A8B3C5",
					label: "Grey"
				},
				{
					value: 120,
					color: "#4D5360",
					highlight: "#616774",
					label: "Dark Grey"
				}

			];

			window.onload = function(){
				var ctx = document.getElementById("chart-area").getContext("2d");
				window.myPie = new Chart(ctx).Pie(pieData);
			};



	</script>
<br>
<br>
<?php include 'partials/footer.php';?>


